#ifndef KU6_THREAD_POOL_H
#define KU6_THREAD_POOL_H 1

#include <stdint.h>
#include <inttypes.h>

#ifdef  __cplusplus
extern "C" {
#endif
struct pool_t;

int thread_key_create(void (*destructor)(void*));
int thread_setspecific(void *opaque);
void thread_init_pools(int threads, int size);
void thread_destroy_pools();
void destroy_pools();
pool_t *thread_mem_pool();
void * thread_calloc(size_t size);
void *thread_realloc(void *data,size_t osize,size_t size);
void thread_reset_pool();
unsigned int thread_recycle(void *pdata,size_t size);
unsigned int thread_free(void *pdata,size_t size);

#ifdef  __cplusplus
}
#endif

#endif //KU6_THREAD_POOL_H
